import { Component, Input, OnInit } from '@angular/core';
import { CommentDataProvider } from '../../providers/comment-data/comment-data';

@Component({
  selector: 'comment-list',
  templateUrl: 'comment-list.html'
})
export class CommentListComponent implements OnInit{

  @Input() parkObjectId: string;
  comments: any[];

  constructor(public commentDataProvider: CommentDataProvider) {
  }

  ngOnInit(): void {
    this.commentDataProvider.getCommentByParkId(this.parkObjectId).subscribe(data=> this.comments = data);
    
  }

}

